package com.mate.cloud.datascope.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mate.cloud.datascope.domain.Order;
import com.mate.cloud.datascope.query.OrderQuery;
import com.mate.cloud.mybatis.bases.BasesMapper;
import com.mate.cloud.scope.annotation.DataScope;
import com.mate.cloud.scope.enums.DataScopeEnum;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface OrderMapper extends BasesMapper<Order> {


    /**
     * 自定义分页
     *
     * @param page  分页参数
     * @param order 订单
     * @return
     */
    @DataScope(type = DataScopeEnum.OWN_DEPT_CHILD)
    List<Order> orderList(Page page, @Param("query") OrderQuery query);
}
